using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.WorkFlow.Entities
{
public partial class TaskHistory
{
readonly static Action<TaskHistory,object>[] _SetValues=new Action<TaskHistory,object>[]{(r,t)=>r.CommandType=Reflection.ParseObject(t, r.CommandType),(r,t)=>r.Description=Reflection.ParseObject(t, r.Description),(r,t)=>r.IdentityName=Reflection.ParseObject(t, r.IdentityName),(r,t)=>r.InstanceId=Reflection.ParseObject(t, r.InstanceId),(r,t)=>r.Proposer=Reflection.ParseObject(t, r.Proposer),(r,t)=>r.ProposerAlias=Reflection.ParseObject(t, r.ProposerAlias),(r,t)=>r.RevertTime=Reflection.ParseObject(t, r.RevertTime),(r,t)=>r.SrcIdentityName=Reflection.ParseObject(t, r.SrcIdentityName),(r,t)=>r.Status=Reflection.ParseObject(t, r.Status),(r,t)=>r.Subject=Reflection.ParseObject(t, r.Subject),(r,t)=>r.TaskId=Reflection.ParseObject(t, r.TaskId)};
readonly static string[] _Columns=new string[]{"CommandType","Description","IdentityName","InstanceId","Proposer","ProposerAlias","RevertTime","SrcIdentityName","Status","Subject","TaskId"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"CommandType", this.CommandType);
AppendValue(action,"Description", this.Description);
AppendValue(action,"IdentityName", this.IdentityName);
AppendValue(action,"InstanceId", this.InstanceId);
AppendValue(action,"Proposer", this.Proposer);
AppendValue(action,"ProposerAlias", this.ProposerAlias);
AppendValue(action,"RevertTime", this.RevertTime);
AppendValue(action,"SrcIdentityName", this.SrcIdentityName);
AppendValue(action,"Status", this.Status);
AppendValue(action,"Subject", this.Subject);
AppendValue(action,"TaskId", this.TaskId);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[11];
cols[0]= RecordColumn.Column("CommandType",this.CommandType);
cols[1]= RecordColumn.Column("Description",this.Description);
cols[2]= RecordColumn.Column("IdentityName",this.IdentityName);
cols[3]= RecordColumn.Column("InstanceId",this.InstanceId);
cols[4]= RecordColumn.Column("Proposer",this.Proposer);
cols[5]= RecordColumn.Column("ProposerAlias",this.ProposerAlias);
cols[6]= RecordColumn.Column("RevertTime",this.RevertTime);
cols[7]= RecordColumn.Column("SrcIdentityName",this.SrcIdentityName);
cols[8]= RecordColumn.Column("Status",this.Status);
cols[9]= RecordColumn.Column("Subject",this.Subject);
cols[10]= RecordColumn.Column("TaskId",this.TaskId);
return cols;
}

}
}

